<template>
  <div>
    <div class="service">
      <badge :value="3" :max="99" type="lineargradient" bounce>
        <img src="@/assets/wechat.png" />
      </badge>
      <div
        class="contact ellipsis no-select"
        @touchstart.stop.prevent
        @copy.stop.prevent
      >
        微信：{{ customer.contact }}
      </div>
      <van-button class="btn" color="#28a745" @click="handleOpenCopy"
        >加微信领取优惠</van-button
      >
    </div>
  </div>
</template>
<script>
import Badge from "@/components/badge";
import tpl from "@/mixins/tpl";

export default {
  mixins: [tpl],
  components: {
    Badge,
  },
  created() {
    // console.log(this.customer);
  },
  methods: {
    // 打开加微弹窗
    handleOpenCopy(ev) {
      this.$emit("click", ev);
    },
    copyWx() {},
  },
};
</script>
<style lang="scss" scoped>
.service {
  height: 1.733rem;
  line-height: 1;
  padding: 0 0.2666rem;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 0.4rem;
  display: flex;
  align-items: center;
  img {
    height: 1.3332rem;
    width: 1.3332rem;
  }
  .contact {
    margin: 0 0.2222rem;
    font-size: 0.4rem;
    flex: 1;
  }
  .btn {
    width: 3.4rem;
    font-size: 0.36rem;
  }
}
</style>
